package com.eastfair.venuebooking.api;

import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.ServiceProviderCreditDTO;
import com.eastfair.venueservice.vo.ServiceProviderCreditVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author lyw
 * @Date 2022/8/11 17:34
 */
@FeignClient(value = "venue-services-manage/serviceProviderCredit")
public interface ServiceProviderCreditFeign {

    /**
     * 添加服务商信用星级分
     * @return
     */
    @PostMapping(value = "/saveServiceProviderCreditInfo")
    R<Boolean> saveServiceProviderCreditInfo(@RequestBody ServiceProviderCreditDTO serviceProviderCreditDTO);

    /**
     * 修改服务商信用星级分
     * @return}
     */
    @PostMapping(value = "/updateServiceProviderCreditInfo")
    R<Boolean> updateServiceProviderCreditInfo(@RequestBody ServiceProviderCreditDTO serviceProviderCreditDTO);


    /**
     * 查询服务商星级分
     * @return
     */
    @GetMapping(value = "/getServiceProviderCreditById/{serviceProviderId}")
    R<ServiceProviderCreditVO> getServiceProviderCreditById(@PathVariable(value ="serviceProviderId")  Long serviceProviderId);
}
